<template>
  <div class="group-title">
    <span v-if="title">{{ title }}</span> <slot v-else name="title"></slot>
    <el-tooltip v-if="help" class="item" effect="dark" :content="help" placement="bottom">
      <el-icon><QuestionFilled /></el-icon>
    </el-tooltip>
  </div>
</template>

<script setup lang="ts">
import { QuestionFilled } from "@element-plus/icons-vue";
interface SelectFilterProps {
  help?: String;
  title?: String;
}

withDefaults(defineProps<SelectFilterProps>(), {
  title: () => "默认标题",
  help: () => ""
});
</script>

<style scoped lang="scss">
.group-title {
  display: flex;
  align-items: center;
  height: 19px;
  padding-left: 5px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 19px;
  color: #333333;
  border-left: 4px solid var(--el-color-primary);
}
</style>
